Less aggressively poison sources on builds
authorAlex Crichton <alex@alexcrichton.com>
Tue, 3 Apr 2018 18:42:44 +0000 (11:42 -0700)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Wed, 4 Apr 2018 06:35:14 +0000 (09:35 +0300)
commitb9755c0a2901200e23c71696266b099630cee0ae
tree0838b22a8898899a7d778cba362dca24ca33425b
parent6173e7bec0340ea0247409b5e2ca1e494552f8c0
Less aggressively poison sources on builds

Discovered in #5257 the changes in #5215 were slightly too aggressively
poisoning sources to require updates, thinking that a manifest changed when it
actually hadn't.

Non-workspace-member path dependencies with optional/dev-dependencies
don't show up in the lock file, so the previous logic would recognize this and
think that the dependency missing from the lock file was just added and would
require a registry update.

The fix in this commit effectively just skips all of these dependencies in
non-workspace members. This means that this will be slightly buggy if an
optional dependency that's activated is added, but that's hopefully something we
can tackle later.

Closes #5257
src/cargo/ops/resolve.rs
tests/testsuite/freshness.rs